<template>
  <div class="reportMistakeInfoAction el-card is-always-shadow el-card__body">
    <el-dialog title="预览" :visible="dialogVisible" :gutter="24" @close="dialogVisible=false" width="60%">

    <div style="text-align: -webkit-center">
      <table>
        <tr style="line-height: 50px">
          <td style="width: 180px">售票员：</td><td>{{formData.conductorName}}</td><td style="min-width: 150px"></td> <td>操作员工号：</td><td>{{formData.conductorJobNo}}</td>
        </tr>
        <tr style="line-height: 50px">
          <td>设备操作号：</td><td>{{formData.deviceOperatorNum}}</td> <td style="min-width: 30px"></td><td>结算开始周期：</td><td>{{formData.settleStartTime}}</td>
        </tr>
        <tr style="line-height: 50px">
          <td>结算截止周期：</td><td>{{formData.settleEndTime}}</td> <td style="min-width: 30px"></td><td>结账日期：</td><td>{{formData.recordTime}}</td>
        </tr>
        <tr style="line-height: 50px">
          <td>现金实收金额：</td><td>{{numToTwoPoint(formData.cashReceiptAmount)}}</td><td style="min-width: 30px"></td><td>电子金额：</td><td>{{numToTwoPoint(formData.electronicAmount)}}</td>
	      </tr>
        <tr style="line-height: 50px">
          <td>客运值班员：</td><td>{{formData.passengerAttendantName}}</td><td style="min-width: 30px"></td><td>客运值班员工号：</td><td>{{formData.passengerAttendantJobNo}}</td> 
        </tr>
        <tr style="line-height: 50px">
          <td>值班站长：</td><td>{{formData.attendancePersonName}}</td><td style="min-width: 30px"></td><td>值班站长工号：</td><td>{{formData.attendancePersonJobNo}}</td>
        </tr>
        <tr style="line-height: 50px">
          <td>售票张数：</td><td>{{formData.yuFashouTicketNum}}</td><td style="min-width: 30px"></td><td>售票金额：</td><td>{{numToTwoPoint(formData.yuFashouTicketAmount)}}</td>
        </tr>
      </table>
      <div style="margin-top: 30px">
        <el-button plain @click.stop="dialogVisible=false">返回</el-button>
      </div>
    </div>
    </el-dialog>
  </div>
</template>


<script>
import moment from "moment";
import {
  getgetStationCodes,
  getLineCodes,
  fenExYuangettoFixed,
  getMappingStatus,
  numToTwoPoint,
} from "../../../../api/subwayRat/commonCheck";
import {
  getXw_bom_shouJieSuan_preview,
  SRJS_TVM_PREVIEW_OptionList,
} from "../../../../api/stationTiecketManager/shouRuJieSuan/bom/preview";
export default {
  components: {},
  data() {
    return {
      dialogVisible: false,
      listLoading: true,
      fileTemp: {},
      formData: {},
      option: SRJS_TVM_PREVIEW_OptionList(),
    };
  },
  created() {},
  methods: {
    moment,
    getMappingStatus,
    fenExYuangettoFixed,
    numToTwoPoint,
    search(row) {
      let r = JSON.parse(JSON.stringify(row));
      this.dialogVisible = true;
      getXw_bom_shouJieSuan_preview(r).then((res) => {
        Object.assign(r, res.data.data);
        this.formData = r;
      });
    },
    handleSelectionChange(val, a) {
      this.multipleSelectionRows = val;
      this.multipleSelectionKeys = [];
      for (let i = 0; i < this.multipleSelectionRows.length; i++) {
        this.multipleSelectionKeys.push(this.multipleSelectionRows[i].id);
      }
    },
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
      if (rowIndex == 0 && columnIndex === 4) {
        return {
          rowspan: this.tableData.length,
          colspan: 1,
        };
      }
    },
    initLine() {
      getLineCodes().then((res) => {
        //获取线路
        this.lineCodes = res;
      });
    },
    changeLine(v) {
      getgetStationCodes(v).then((res) => {
        this.stationCodes = res;
      });
    },

    selectionChange(list) {
      this.multipleSelectionRows = list;
      this.multipleSelectionKeys = [];
      for (let i = 0; i < list.length; i++) {
        this.multipleSelectionKeys.push(list[i].id);
      }
    },
    handleFilter(params, done) {
      Object.assign(this.searchForm, params);
      this.search();
      done();
    },
  },
  mounted() {},
};
</script>
<style lang="scss">
</style>
